Skip to content

激活会员卡(跳转型激活)

如果商家选择跳转激活的投放方式,用户跳转至商家页商家H5网页/小程序后,商家可调用激活会员卡接口激活会员。

请求参数类型描述
card_idstring会员卡id
codestring会员卡code
jsonobject声明请求的JSON数据结构
membership_numberstring会员卡编号
php
$instance->v3->marketing->membercardOpen->cards->_card_id_->codes->_code_->activate->postAsync([
  'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
  'code' => '478515832665',
  'json' => [
    'membership_number' => '316510891298',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/marketing/membercard-open/cards/{card_id}/codes/{code}/activate')->postAsync([
  'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
  'code' => '478515832665',
  'json' => [
    'membership_number' => '316510891298',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/marketing/membercard-open/cards/{card_id}/codes/{code}/activate']->postAsync([
  'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
  'code' => '478515832665',
  'json' => [
    'membership_number' => '316510891298',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->marketing->membercardOpen->cards->_card_id_->codes->_code_->activate->post([
  'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
  'code' => '478515832665',
  'json' => [
    'membership_number' => '316510891298',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/marketing/membercard-open/cards/{card_id}/codes/{code}/activate')->post([
  'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
  'code' => '478515832665',
  'json' => [
    'membership_number' => '316510891298',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/marketing/membercard-open/cards/{card_id}/codes/{code}/activate']->post([
  'card_id' => 'pbLatjvWOibDc5-TBnbUk1pD12o0',
  'code' => '478515832665',
  'json' => [
    'membership_number' => '316510891298',
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory